package com.jarvis.zeng.design.pattern.decorator.drawshape;

/**
 * @author ZengJun
 */
public class DecoratorPatternDemo {
   public static void main(String[] args) {
 
//      Shape circle = new Circle();
//      System.out.println("Circle with normal border");
//      circle.draw();
//
//      System.out.println("\nCircle of red border");
//      AbstractShapeDecorator redCircle = new RedAbstractShapeDecorator(new Circle());
//      redCircle.draw();
//
//      System.out.println("\nRectangle of red border");
//      AbstractShapeDecorator redRectangle = new RedAbstractShapeDecorator(new Rectangle());
//      redRectangle.draw();


      Shape circleShape = new ShapeDecorator(new Circle());
      circleShape.draw();

      Shape rectangleShape = new ShapeDecorator(new Rectangle());
      rectangleShape.draw();

      Shape redCircleShape = new ShapeDecorator(new Circle(),new RedColor());
      redCircleShape.draw();

      Shape blueRectangleShape = new ShapeDecorator(new Rectangle(),new BlueColor());
      blueRectangleShape.draw();
   }
}